import 'package:flutter/material.dart';
import 'package:note_app/const_values.dart';

ThemeData buildLightTheme() => ThemeData.light().copyWith(
      scaffoldBackgroundColor: backColor,
      dialogTheme: DialogTheme(
        backgroundColor: backColor,
        titleTextStyle: TextStyle(
          color: Colors.black,
          fontFamily: 'haoshenti',
          fontWeight: FontWeight.bold,
        ),
        contentTextStyle: TextStyle(
          fontFamily: 'haoshenti',
          color: Colors.black,
        ),
      ),
      dividerColor: defaultBlack,
      appBarTheme: AppBarTheme(
        centerTitle: true,
        brightness: Brightness.dark,
        elevation: 0.0,
        shadowColor: Colors.transparent,
        color: Colors.transparent,
        textTheme: TextTheme(
          headline6: TextStyle(
            fontSize: 20,
            fontWeight: FontWeight.bold,
            fontFamily: 'haoshenti',
            color: primaryColor,
          ),
        ),
        iconTheme: IconThemeData(
          color: primaryColor,
        ),
      ),
      dialogBackgroundColor: backColor,
      textTheme: Typography.blackCupertino.apply(
        fontFamily: 'haoshenti',
      ),
    );

ThemeData buildDarkTheme() => ThemeData.dark().copyWith(
      scaffoldBackgroundColor: darkColor,
      dialogTheme: DialogTheme(
        backgroundColor: Colors.grey[900],
        titleTextStyle: TextStyle(
          fontFamily: 'haoshenti',
          color: Colors.white,
          fontWeight: FontWeight.bold,
        ),
        contentTextStyle: TextStyle(
          fontFamily: 'haoshenti',
          color: Colors.white,
        ),
      ),
      switchTheme: SwitchThemeData(
        thumbColor: MaterialStateProperty.resolveWith(
          (states) => Colors.grey[400],
        ),
        trackColor: MaterialStateProperty.resolveWith(
          (states) => Colors.white,
        ),
      ),
      appBarTheme: AppBarTheme(
        centerTitle: true,
        brightness: Brightness.dark,
        elevation: 0.0,
        textTheme: TextTheme(
          headline6: TextStyle(
            fontFamily: 'haoshenti',
            fontSize: 20,
            fontWeight: FontWeight.bold,
            color: darkprimaryColor,
          ),
        ),
        shadowColor: Colors.transparent,
        color: Colors.transparent,
        iconTheme: IconThemeData(
          color: darkprimaryColor,
        ),
      ),
      textTheme: Typography.whiteCupertino.apply(
        fontFamily: 'haoshenti',
      ),
    );
